package com.fast.cron.db.dao;

import com.fast.cron.db.entry.User;

import java.sql.SQLException;

/**
 * @author: Leo Jie
 * @date: 2018-10-02 21:04
 * @version: v1.0
 */
public interface UserDao {
    /**
     * find user by username
     *
     * @param username the name of user
     * @return the obj of user
     * @throws SQLException the error when execute sql
     */
    User findOneUserByUsername(String username) throws SQLException;

    /**
     * find user by username and password and status is useful
     *
     * @param username the name of user
     * @param password the password of user
     * @return the obj of user
     * @throws SQLException the error when execute sql
     */
    User findOneUserByUsernameAndPassword(String username, String password) throws SQLException;

}
